package com.atguigu.guli.service.edu.feign;

import com.atguigu.guli.service.base.result.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@Service
@FeignClient(value = "service-oss",fallback = OssFileServiceFallBack.class)
public interface OssFileService {
    @GetMapping("/admin/oss/file/test")
    R test();

    @DeleteMapping("/admin/oss/file/delete")
    R deleteFile(@RequestParam("path") String path ,
                 @RequestParam("module") String module );

    @DeleteMapping("/admin/oss/file/batchDelete")
    R batchDelete(@RequestBody List<String> pathList,
                  @RequestParam("module") String module);
}
